package priv.yiyuan.example.design;

/**
 * 矩形
 * <p>
 * 桥接模式(扩展抽象部分)/组合模式(叶子)
 */
public class Rectangle extends Shape {

    private double width;

    private double height;

    public Rectangle(Renderer renderer, double width, double height) {
        super(renderer);
        this.width = width;
        this.height = height;
    }

    @Override
    public void draw() {
        renderer.renderRectangle(width, height);
    }
}
